package br.com.registrofinancas.view;

import br.com.registrofinancas.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.ViewStub;
import android.widget.Button;
import android.widget.TextView;
 
public abstract class DashBoardActivity extends Activity {
    
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
 
    public void setHeader(String title, boolean btnHomeVisible, boolean btnFeedbackVisible)
    {
      ViewStub stub = (ViewStub) findViewById(R.id.activity_menu_vs_header);
      View inflated = stub.inflate();
 
      TextView txtTitle = (TextView) inflated.findViewById(R.id.header_tv_heading);
      txtTitle.setText(title);
 
      Button btnHome = (Button) inflated.findViewById(R.id.header_bt_menu);
      if(!btnHomeVisible)
       btnHome.setVisibility(View.INVISIBLE);   
 
    }
 
    /**
     * Home button click handler
     * @param v
     */
    public void btnHomeClick(View v)
    {
     Intent intent = new Intent(getApplicationContext(), MenuActivity.class);
     intent.setFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP);
     startActivity(intent);
 
    }
 
    
}
